package com.tssup.fesco.common.enumeration;

/**
 * Created by franco.cheng on 2017/3/22.
 */
public enum InvoiceStatus {
    UNSENT("未发出", 1), SENT("已发出",2), RECEIVE("已收取",3), CANCEL("已取消",4);

    private String displayName;
    private Integer value;

    InvoiceStatus(String displayName, Integer value) {
        this.displayName = displayName;
        this.value = value;
    }

    public static String getDisplayName(Integer value) {
        if(null != value){
            for (InvoiceStatus t : InvoiceStatus.values()) {
                if (t.getValue().equals(value)) {
                    return t.getDisplayName();
                }
            }
        }
        return null;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
